package peer.tools;

import java.io.File;




public class Mdf {
	File f;
	String MdfDir;
	public Mdf(File f,String s){	
		this.f=f;
		MdfDir=s;
	}
	public byte[] creat(){
		Md5Sum ms=new Md5Sum(f.getAbsolutePath());
		byte[][] mdba = ms.handleFileInput();
		Pmd52f p2f=new Pmd52f(MdfDir);
		String fileName=f.getName();
		int index=fileName.lastIndexOf('.')+1;
		String fileExtention=fileName.substring(index);
		return p2f.savePmd5(mdba,MdfDir,(int) f.length(),fileExtention);
	}
}
